package com.lbd.common.exception;

/**
 * @ProjectName: gulimall
 * @Package: com.lbd.common.exception
 * @ClassName: BizCodeEnum
 * @Author: linbd
 * @Description: 业务状态码枚举
 * @Date: 2021/6/14 17:50
 */
public enum BizCodeEnum {
    UNKNOWN_EXCEPTION(10000, "系统未知异常"),
    VAILD_EXCEPTION(10001, "参数格式校验失败"),
    PRODUCT_EXCEPTION(11000, "商品上架异常"),
    SMS_CODE_EXCEPTION(12000, "验证码获取频率太高，请稍后再试"),
    SMS_SEND_EXCEPTION(12001, "验证码发送失败，请重试"),
    USERNAME_REPEAT_EXCEPTION(15001, "用户名已存在"),
    PHONE_REPEAT_EXCEPTION(15002, "手机号码已存在"),
    USERNAME_PASSWORD_INVALID_EXCEPTION(15003, "账号密码错误"),
    HTTP_CALL_EXCEPTION(20000,"码云第三方接口调用异常");
    int code;
    String msg;

    BizCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
